﻿using System;
using fastCSharp;

namespace diantou.web.ajax
{
    /// <summary>
    /// 话题操作
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class topic : userHandle<topic>
    {
        /// <summary>
        /// 创建话题
        /// </summary>
        /// <param name="name"></param>
        /// <param name="onReturn"></param>
        public void Create(string name, Action<fastCSharp.net.returnValue<int>> onReturn)
        {
            diantou.dataAccess.tcpCall.topic.create(new diantou.dataAccess.topic { UserId = currentUser.Id, Name = name }, onReturn);
        }
        /// <summary>
        /// 修改话题名称
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        public void ReworkName(diantou.dataAccess.topic value, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            value.ReworkNameUserId = currentUser.Id;
            diantou.dataAccess.tcpCall.topic.reworkName(value, onReturn);
        }
        /// <summary>
        /// 修改话题描述
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        public void ReworkRemark(diantou.dataAccess.topic value, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            value.ReworkRemarkUserId = currentUser.Id;
            diantou.dataAccess.tcpCall.topic.reworkRemark(value, onReturn);
        }
    }
}
